$(function(){
    init();
})
function init(){
    var userData=baseFunction.getUserInfo();
    var data1 = JSON.parse(JSON.parse(userData).merch);
    var data2 = JSON.parse(JSON.parse(userData).user);
    var trueName=data1.accountName; ////真实姓名
    var idCard= data1.identityCard;//身份证
    var userName= data2.trueName;//昵称
    var password= data2.password; //密码
    var phone= data2.mobile ? data2.mobile:"";//手机号
    var wxL=data2.wxno ? data2.wxno:"";//微信号
    // dom
    $("#modifyName .right span").html(userName);
    $("#modifyWeChat .right span").html(wxL);
    $("#phone").html(phone);
    $(".list2 .name").html(trueName);
    $(".list2 .id").html(idCard);

    // 修改昵称
    $("#modifyName").on("click",function(){
        window.location.href="my_modifyName.html?userName="+encodeURIComponent(userName)+"&loginName="+phone+"&password="+password+"";
    })
    // 修改微信
    $("#modifyWeChat").on("click",function(){
        window.location.href="my_modifyWeChat.html?wx="+wxL+"&loginName="+phone+"&password="+password+"";
    })
  }